Can't locate object method "data" via package "CPAN::Modulelist"

chris (2008-01-17 18:30:13)
8597 views
1 replies
If you start seeing this error when using the cpan> prompt, don't panic. It simply means that the module index is incomplete, or corrupted, or unavailable for some reason. That's just an index which CPAN uses to indicate what modules are available.

This problem caught me out earlier today.. Hopefully this will save you some time - In order to solve the problem, just run this at your cpan prompt:
cpan> reload index

Then try again with your install command and it should work just fine..

christo
comment
Dan Falconer
2008-12-29 17:02:19

Solution

I tried to do the "reload index" fix, but that didn't seem to work for me. Deleting the CPAN/Config.pm and the .cpan directory (in my case, /root/.cpan/) finally did the trick. I know this is an old post, but I didn't find an answer anywhere else (and this website was the first hit from Google).
reply iconedit reply